package com.huawei.appmarket.service.externalapi.jumpers;

import android.net.Uri;
import com.huawei.appgallery.foundation.service.common.protocol.AppDetailActivityProtocol;
import com.huawei.appgallery.foundation.service.common.protocol.AppDetailActivityProtocol.Request;
import com.huawei.hms.framework.common.ContainerUtils;
import java.util.Iterator;
import o.ceb;
import o.cej;
import o.cjm;
import o.cjo;
import o.dof;
import o.dyr;
import o.dys.a;
import o.dyw;

public class CommonActionJumper extends dyw {
    private String ॱ;

    public CommonActionJumper(dyr o_dyr, a aVar, Uri uri) {
        super(o_dyr, aVar, uri);
    }

    public void ॱ() {
        Iterator it = cej.ˎ(this.ˊ.getEncodedQuery()).iterator();
        while (it.hasNext()) {
            String trim = ((String) it.next()).trim();
            String ˏ = ceb.ˏ(this.ˊ, trim);
            if (!"id".equals(trim)) {
                if ("order".equals(trim)) {
                    cjo appDetailActivityProtocol = new AppDetailActivityProtocol();
                    Request request = new Request();
                    request.ˋ(ˏ);
                    appDetailActivityProtocol.ˏ(request);
                    this.ˏ.ˎ(new cjm("appdetail.activity", appDetailActivityProtocol), 0);
                    break;
                }
            }
            trim = "package|" + ˏ;
            cjo appDetailActivityProtocol2 = new AppDetailActivityProtocol();
            Request request2 = new Request();
            request2.ˋ(trim);
            if (it.hasNext()) {
                request2.ॱˊ(ˏ(it));
            }
            appDetailActivityProtocol2.ˏ(request2);
            this.ˏ.ˎ(new cjm("appdetail.activity", appDetailActivityProtocol2), 0);
        }
        this.ˎ.dailyReport("", this.ॱ);
        this.ˏ.finish();
    }

    private String ˏ(Iterator<String> it) {
        StringBuilder stringBuilder = new StringBuilder();
        String trim = ((String) it.next()).trim();
        String ˎ = dof.ˎ(ceb.ˏ(this.ˊ, trim));
        if ("referrer".equals(trim)) {
            this.ॱ = ˎ;
            stringBuilder.append(trim).append(ContainerUtils.KEY_VALUE_DELIMITER).append(ˎ).append(ContainerUtils.FIELD_DELIMITER).append("clickTime").append(ContainerUtils.KEY_VALUE_DELIMITER).append(System.currentTimeMillis());
        }
        return stringBuilder.toString();
    }
}
